<?php
declare(strict_types=1);

namespace Core\Package\ElementPlus\Component;

use JetBrains\PhpStorm\ExpectedValues;

class Component
{
    /**
     * 设置隐藏域
     * @param string $text
     * @param string $type
     * @return AlertComponent
     */
    public static function Alert(string $text, string $type = 'info'): AlertComponent
    {
        return new AlertComponent($text, $type);
    }


    /**
     * 设置分割线
     * @param string $default
     * @param string $position
     * @return DividerComponent
     */
    public static function Divider(string $default, #[ExpectedValues(['left', 'right', 'center'])] string $position = 'left'): DividerComponent
    {
        return new DividerComponent($default, $position);
    }
}